package xyz.xpman.prisonerfitness.kit;

import android.content.Context;

import org.jetbrains.annotations.NotNull;

import xyz.xpman.prisonerfitness.config.QQConfig;
import xyz.xpman.prisonerfitness.config.QQGroupConfig;

public enum QQKitProxy {;
    private static QQConfig config = null;


    public static void init(QQConfig qqConfig) {
        if (null == config) {
            config = qqConfig;
        }
    }

    public static void toJoinGroupPage(@NotNull Context context) {
        QQGroupConfig availableGroup = config.getAvailableGroup();

        if (null != availableGroup) {
            QQKit.toJoinGroupPage(context, availableGroup.getKey(), availableGroup.getPasswd());
        }
    }


    public static void toAddFriendsPage(@NotNull Context context) {
        QQKit.toAddFriendsPage(context, config.getId());
    }

    /**
     * 如果没有添加好友，会跳转到添加好友页面
     */
    public static void toChatPage(@NotNull Context context) {
        QQKit.toChatPage(context, config.getId());
    }

}
